import com.jiang.pojo.User;
import com.jiang.service.Userservice;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author jiangjingbo
 * @version V1.0
 * @Project java2203
 * @Package PACKAGE_NAME
 * @Description:
 * @Date 2022/6/7 11:02
 */
//声明使用spring 测试类环境来测试
@RunWith(SpringJUnit4ClassRunner.class)
//加载spring 核心配置文件
@ContextConfiguration("classpath:applicationContext.xml")
public class test1 {
    @Resource(name="service1")
    private Userservice userservice;
    @Test
    public void name() {
        List<User> userALL = userservice.findUserALL();
        System.out.println(userALL);




    }
}
